#include const int POTENTIOMETER_PIN = A0; const int SLAVE_ADDRESS = 8; void setup() { serial.begin(9600); Wire.begin(SLAVE_ADDRESS); void loop() int potvalue =analogRead(POTENTIOMETER_PIN); Wire.write(map(potValue,0,1023,0,255)); Serial.println(potValue); delay(100); }